package com.sunday.demo.lod.handler;

import com.sunday.demo.lod.entity.Html;
import com.sunday.demo.lod.factory.DocumentFactory;

/**
  @program: design-patterns
  @author: Jh
  @create: 2021-09-01 10:20
*/
public class Document {

    private String url;
    private Html html;

    public Document(String url, Html html) {
        this.url = url;
        this.html = html;
    }

    public static void main(String[] args) {
        String url = "http://www.baidu.com";
        Document document = new DocumentFactory(new HtmlDownLoader(new NetWorkTransporter())).create(url);
    }
}
